package com.walle.eve.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.walle.eve.mapper.RolesMapper;
import com.walle.eve.mapper.UserMapper;
import com.walle.eve.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserMapper userMapper;

	@Override
	public Map<String, Object> getUserInfoById(String id) {
		return userMapper.getUserInfoById(id);
	}

	@Override
	public List<Map<String, Object>> getUserList() {
		List<Map<String, Object>> reslutList = userMapper.getUserList();
		return reslutList;
	}

	@Override
	@Transactional
	public int addUser(String userName, String realName) {
		return userMapper.addUser(userName, realName);
	}

	@Override
	public int deleteUser(String id) {
		return userMapper.deleteUser(id);
	}

}
